package com.liu.sx.netty;

import com.liu.sx.pojo.BW;
import io.netty.channel.Channel;
import io.netty.channel.ChannelHandlerContext;

public class Client {

   private Channel context;
   private   String address;

   public Client(Channel context){
       this.context=context;
   }

    /**
     * 发送任务
     * @param bw
     * @return
     */
   public  boolean sendMsg(BW bw){
       boolean  flag =false;
       if (context.isActive()){
           context.writeAndFlush(bw);
           flag=true;
       }
         return flag;
   }

}
